import { defineStore } from 'pinia';

export const useLoginStore = defineStore('Login', {
    state: () => ({
        tabList:[
            {label:'密码登里',name:"password"},
            {label:"验证登录手机号信息",name:"verification"},
            {label:'扫码登陆',name:"qrcode"}],
             hideVisble:true,//默认显示的忘记密码等入口
             isActive:'password'
    }),
    actions: {
        handleChangeVisable(enable){
            this.hideVisble=enable
        },
        handleUpdate(lists){
            if(Array.isArray(lists)){
                lists.forEach((v)=>{
                    this[v.key]=v.value;
                })
            }
           console.log(this)
        },
        handleActiveTab(key){
            this.isActive=key
        }
    },
    
});